package com.jiangnan.filter;

import javax.swing.filechooser.FileFilter;
import java.io.File;

/**
 *
 * json文件过滤器
 * @author chenliang
 * @email wschenliang@aliyun.com
 */
public class JsonFileFilter extends FileFilter {
    @Override
    public boolean accept(File f) {
        String name = f.getName();
        return name.toLowerCase().endsWith("json");
    }

    @Override
    public String getDescription() {
        return "*.json";
    }
}
